<?php $this->layout = 'admin'; ?>
<?php if ($admin == 1) { ?>


            <?php $this->start('leftmenu'); ?>
        <div class="well pull-left">
            <ul class="nav nav-list">
                <li><?php echo $this->Html->link('Add User', array('controller' => 'Users', 'action' => 'add')); ?></li>
                <li><?php echo $this->Html->link('Delete User', array('controller' => 'Users', 'action' => 'delete')); ?></li>
                <li><?php echo $this->Html->link('Restore User', array('controller' => 'Users', 'action' => 'restore')); ?></li>
            </ul>
        </div>
            <?php $this->end(); ?>
            <?php } ?>
<html>
<body>
<?php if ($admin == 1) { ?>
<table width="111" height="44" border="1">
<tr>
	<th>Image</th>
	<th>Name</th>
	<th>Actions</th>
	
  <?php while($l>0){ ?>
  <tr>
  <td width = "15"><center><?php echo $this->Html->image($usersArray[$length-$l]['User']['image'],array('width'=>'50px','height'=>'50px'))?></center></td>
    <td width="214"><?php echo $usersArray[$length-$l]['User']['username'] ?></td>
	    <td width="56"><?php echo $this->Html->link('Reactivate' ,array('action'=> 'restore1' , $usersArray[$length-$l]['User']['userID']),array(),"Are you sure you wish to delete this user ?") ?></td>
  </tr>
  <?php $l-- ; }?>
  
</table>
<?php } ?>
</html>
